package com.boot.stomp;

import com.boot.stomp.service.DefaultStompSupplierService;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.cloud.stream.function.StreamBridge;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author 霜寒 <1621856595@qq.com>
 * @date 2021/8/2 22:33
 **/

@Configuration
public class StompSupplierAutoConfiguration {

    @ConditionalOnMissingBean(value = String.class, parameterizedContainer = DefaultStompSupplierService.class)
    @Bean
    DefaultStompSupplierService<String> defaultStompSupplierService(StreamBridge streamBridge) {
        return new DefaultStompSupplierService<>(streamBridge);
    }

}
